<template>
  <Maptalks :mapOnLoadCB="mapOnLoadCB"></Maptalks>
</template>

<script>
import Maptalks from "@/components/common/Maptalks.component.vue"
import MapLayerConst from "@/const/MapLayerConst"
import windyData from "@/data/windy"

export default {
  name: "AddWindyLayer.component",
  components: {Maptalks},
  setup() {

    let mapOnLoadCB = (map) => {
      map.setZoom(5)

      let options = {
        "opacity": 0.3
      }

      let layer = new maptalks.WindyLayer(MapLayerConst.MAP_WINDY_LAYER, windyData, options).addTo(map);
    };

    return {
      mapOnLoadCB
    }
  }
}
</script>

<style scoped>

</style>